<template>
    <a-modal title="JSON" :bodyStyle="{ maxHeight: '70vh', overflow: 'auto' }">
        <a-textarea v-model:value="json" autosize></a-textarea>
    </a-modal>
</template>
<script lang="ts">
import { defineComponent, inject } from "vue";

export default defineComponent({
    setup() {
        const treeData = inject<any>("treeData");
        const json = JSON.stringify(treeData.value, null, "\t");

        return {
            treeData,
            json,
        };
    },
});
</script>
